﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CoHSIN.Models.PageTab>" %>

<div id="tabContent">
    <% 
    if (Model.Tab.Contents.FirstOrDefault() == null || string.IsNullOrEmpty(Model.Tab.Contents.FirstOrDefault().ContentData))
        { 
            %>
            No content has been created for this tab.
            <% 
            if (CoHSIN.Globals.isAdmin)
            { 
                %>
                <br /> Click the Edit Content button to create content for this tab. &nbsp;&nbsp; &uarr;
                <% 
            }
            else
            { 
                %>
                <br />Please advise a site administrator that this tab has no content.
                <br /><br />
                If you believe you have received this message in error, please send an email 
<pre>
TO:         Kelly Draper
Subject:    Missing CoHSIN Content
Message:    CoSHIN is erroneously displaying "no content available" for
                Page: <%= Model.Tab.Page.PageLabel%>
                Tab: <%= Model.Tab.TabLabel%>
</pre>
                <% 
            }
       }
       else
       {
            %>
            <%= Model.Tab.Contents.FirstOrDefault().ContentData%>
            <%
       } %>
</div>
<div id="editContent">
<textarea name="ta_content" id="ta_editContent" class="tinymce" cols="1" rows="1"></textarea>
</div>
